/*
	The MIT License

	Copyright (c) 2008 IFMO/GameDev Studio

	Permission is hereby granted, free of charge, to any person obtaining a copy
	of this software and associated documentation files (the "Software"), to deal
	in the Software without restriction, including without limitation the rights
	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
	copies of the Software, and to permit persons to whom the Software is
	furnished to do so, subject to the following conditions:

	The above copyright notice and this permission notice shall be included in
	all copies or substantial portions of the Software.

	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
	THE SOFTWARE.
*/
// gui_decoration.h - 

#pragma once



class EGUIDecoration : public EGUIEntity {
	public:
						EGUIDecoration	( EGUIManager *fm, const char *name );
						~EGUIDecoration	( void );
						
		//	Decoration tuning :
		const char		*GetBigFont					( void ) const { return font_big->String(); }
		const char		*GetMediumFont				( void ) const { return font_medium->String(); }
		const char		*GetSmallFont				( void ) const { return font_small->String(); }
		
		EVec4			GetWindowColor				( void ) const { return window_color->Vec4(); }
		EVec4			GetWindowColorCaption		( void ) const { return window_color_caption->Vec4(); }
		float			GetWindowCaptionHeight		( void ) const { return window_caption_height->Float(); }
		
		EVec4			GetControlColorBackground	( void ) const { return control_color_background->Vec4(); }
		EVec4			GetControlColorForeground	( void ) const { return control_color_foreground->Vec4(); }
		EVec4			GetControlColorHighlight	( void ) const { return control_color_highlight->Vec4(); }
		EVec4			GetControlColorActivated	( void ) const { return control_color_activated->Vec4(); }
		
		float			GetFadeInTime		( void ) const { return time_fade_in->Float(); }
		float			GetFadeOutTime		( void ) const { return time_fade_out->Float(); }
		float			GetTextCtrlSpacing	( void ) const { return text_ctrl_spacing->Float(); }

		//	Drawing stuff :
		void			DrawBorderRect		( float x, float y, float w, float h, const char *image, const EVec4 &color );
		void			DrawBorderRectTop	( float x, float y, float w, float h, const char *image, const EVec4 &color );
		void			DrawBorderRectBottom( float x, float y, float w, float h, const char *image, const EVec4 &color );
		void			DrawTextInRect		( float x, float y, float w, float h, const char *font_name, const char *text, const EVec4 &color, guiAlign_t align=GUI_ALIGN_CENTER );
	protected:
		IVar	*font_big;
		IVar	*font_medium;
		IVar	*font_small;
	
		//	Window properties :
		IVar	*window_color;
		IVar	*window_color_caption;
		IVar	*window_caption_height;
		
		//	Button properties :
		IVar	*control_color_background;
		IVar	*control_color_foreground;
		IVar	*control_color_highlight;
		IVar	*control_color_activated;
		
		//	Fade in/fade out timing
		IVar	*time_fade_in;
		IVar	*time_fade_out;
		
		IVar	*text_ctrl_spacing;	// min distance between edge of the control and text
	};
	









